package cn.webwheel.tutorials.integration;

import cn.webwheel.utils.DefaultAction;
import cn.webwheel.utils.RedirectResult;

import javax.servlet.http.HttpSession;

/**
 * 重置神秘数字动作
 */
public class ActReset extends DefaultAction {

    private HttpSession session;

    public ActReset(HttpSession session) {
        this.session = session;
    }

    public Object execute() throws Exception {
        session.invalidate();
        //重定向到首页
        return new RedirectResult("/index.html");
    }
}
